<script setup>
import {useRoute, useRouter} from "vue-router";

let route = useRoute();
function getInfo(){
  console.log(route.params)
  console.log(route.name)
  console.log(route.path)
  console.log(route.fullPath)
}

let router = useRouter();
function getHome(){
  router.push("/")
}

function back(){
  router.go(-1)
}
</script>

<template>
  <h3>个人详情</h3>
  <button @click="getInfo">页面信息</button>
  <button @click="getHome">跳到首页</button>
  <button @click="back">回退</button>
</template>

<style scoped>

</style>